libmyc.a:math.o mystdio.o
	ar -rc $@ $^
	rm *.o
%.o:%.c
	gcc -c $<


libmyc.so:mystdio.o math.o
	gcc -shared -o $@ $^
	rm *.o
%.o:%.c
	gcc -c -fPIC $<

.PHONY:clean
clean:
	rm -f *.o *.a *.so *.tar

.PHONY:output
output:
	mkdir -p mylib/include
	mkdir -p mylib/lib
	cp *.h mylib/include
	cp *.so mylib/lib
	cp *.a mylib/lib
	tar -cvf mylib.tar mylib